package pl.edu.agh.jemo.evolution.operator.mutation;

import javax.swing.JPanel;

import pl.edu.agh.jemo.evolution.specimen.Specimen;

/**
 * Common interface for all mutation operators implementation. Every subclass should specify, how specimen genotype is modified in order to get new specimen simmilar to it's parent.
 * This base mutation or it's subclass type should be used to store mutation objects in every algorithm. 
 * 
 * @author Marcin Zbijowski
 *
 */
public interface Mutation {
	/**
	 * Changes specimen genotype in the way it is simmilar to it's parent.
	 * 
	 * @param specimen Reference to parent specimen, whoes genotype will be modified.
	 */
	public void performMutation(Specimen specimen);
	
	/**
	 * Returns configuration panel being extension of JPanel instance.
	 * Returned panel is displayed by graphical user interface allowing user to confgiure mutation.
	 * This method may return null if no configuration for operator is possible.
	 * 
	 * @return Instance of JPanel with initialized components prepared to configure objects properties.
	 */
	public JPanel getConfigPanel();
}
